<?php
	//FUNCIONES DE ESTA FUNCIONALIDAD ESPECIFICA:


	//	Funcion que, realiza el reemplazo de un PATRON de letras por su emoticon respectivo:
	function Reemplaza_texto_por_emoticon($texto)
	{
		$patterns = array();
		$patterns[0] = ':)';
		$patterns[1] = 'line:?';
		$patterns[2] = 'r:s-';
		$patterns[3] = ':C';
		$patterns[4] = ':-A';
		$patterns[5] = ':-H';
		$patterns[6] = ':-L';
		$patterns[7] = ':-O';
		$patterns[8] = 'xdd';
		$patterns[9] = 'diablonn';
		
		$replacements = array();
		$replacements[0] = '<img border="0" src="images/emoticones/feliz_estandar.png" width="25px" />';
		$replacements[1] = '<img border="0" src="images/emoticones/line.jpg" />';
		$replacements[2] = '<img border="0" src="images/emoticones/rem.png" width="150px" />';
		$replacements[3] = '<img border="0" src="./images/smileys/cry.png" width="25px" />';
		$replacements[4] = '<img border="0" src="./images/smileys/angry.png" width="25px" />';
		$replacements[5] = '<img border="0" src="./images/smileys/heart.png" width="25px" />';
		$replacements[6] = '<img border="0" src="./images/smileys/love.png" width="25px" />';
		$replacements[7] = '<img border="0" src="./images/smileys/nothing.png" width="25px" />';
		$replacements[8] = '<img border="0" src="images/emoticones/xdd.png" />';
		$replacements[9] = '<img border="0" src="images/emoticones/devil-icon.png" width="150px"/>';
		
		return str_replace($patterns, $replacements, $texto);
		
		//return preg_replace($patterns, $replacements, $texto);		
		
	}
	
?>